<!DOCTYPE html>
<html>
<head>
    <include file="./public/sty.html"/>
</head>
<body>
<div id="app" class="lottery">
    <div data-v-3a1bf799="" id="container" class="Trend_chart" s="[object Object]">
        <div data-v-3a1bf799="" class="select-section clearfix">
            <div data-v-3a1bf799="" class="select-function"><a data-v-3a1bf799="" class="funAreaBtn"><em
                    data-v-3a1bf799="">收起功能区</em><i data-v-3a1bf799="" class="iconfont"></i></a>
                <a data-v-3a1bf799="" download="" class="btn" href="{:U('Lottery/kl8_xiazai',array('qishu'=>$qishu))}">报表下载</a>
            </div>
            <div data-v-3a1bf799="" id="select_lottery"><h3 data-v-3a1bf799="" class="select-title">彩种：北京快乐8</h3>
                <ul data-v-3a1bf799="" class="select-list">
                    <li data-v-3a1bf799="" class="current"><a data-v-3a1bf799="">基本走势</a></li>
                </ul>
            </div>
        </div>
        <div data-v-3a1bf799="" class="chart_control_cont">
            <div data-v-3a1bf799="" class="title">基本走势图</div>
            <div data-v-3a1bf799="" class="function"><label data-v-3a1bf799="" for="Guide" data-state="1" class="label"><input
                    data-v-3a1bf799="" name="Guide" checked type="checkbox" class="checkbox">辅助线</label>
            </div>
            <div data-v-3a1bf799="" id="periods-data" class="time">
                <a data-v-3a1bf799="" class="<?php if($qishu==1){echo 'fb';} ?>"
                   href="{:U('Lottery/trendChart_kl8',array('qishu'=> '1'))}">近30期</a>
                <a data-v-3a1bf799="" class="<?php if($qishu==2){echo 'fb';} ?>"
                   href="{:U('Lottery/trendChart_kl8',array('qishu'=> '2'))}">近50期</a>
                <a data-v-3a1bf799="" class="<?php if($qishu==3){echo 'fb';} ?>"
                   href="{:U('Lottery/trendChart_kl8',array('qishu'=> '3'))}">近200期</a>
            </div>
        </div>
        <div data-v-3a1bf799="" id="J-chart-area" class="chart-section">
            <table data-v-3a1bf799="" width="100%" cellpadding="0" cellspacing="0" class="chart-table">
                <thead data-v-3a1bf799="" class="thead"><!----> <!----> <!----> <!----> <!----> <!---->
                <tr data-v-3a1bf799="" class="title-text" >
                    <th data-v-3a1bf799="" rowspan="2" colspan="3" class="border-bottom border-right">期号</th>
                    <th data-v-3a1bf799="" colspan="3" rowspan="2"  class="border-right border-bottom" >开奖号码</th>
                    <th data-v-3a1bf799="" colspan="3" rowspan="3" class="border-right border-bottom">大小</th>
                    <th data-v-3a1bf799="" colspan="3" rowspan="2" class="border-right border-bottom">单双</th>
                    <th data-v-3a1bf799="" colspan="3" rowspan="2" class="border-right border-bottom">奇偶</th>
                    <th data-v-3a1bf799="" colspan="3" rowspan="2" class="border-bottom">和值</th>
                </tr>
                </thead>
                <tbody data-v-3a1bf799="" id="J-chart-content" class="chart table-guides">
                <foreach name="arr" item="v" key="k">
                    <tr data-v-3a1bf799="" class="">
                        <td data-v-3a1bf799="" class="ball-none"></td>
                        <!--期号-->
                        <td data-v-3a1bf799="" class="issue-numbers">{$v.issue}</td>
                        <td data-v-3a1bf799="" class="ball-none border-right"></td>
                        <td data-v-3a1bf799="" class="ball-none"></td>
                        <!--开奖码-->
                        <td data-v-3a1bf799="" class="">
                            <span data-v-3a1bf799="" class="lottery-numbers">{$v.opencode}</span>
                        </td>
                        <td data-v-3a1bf799="" class="ball-none border-right"></td>
                        <td data-v-3a1bf799="" class="ball-none"></td>
                        <td data-v-3a1bf799=""  class="dxxintai bgc_blue border-right">
                            <i data-v-3a1bf799="" class="ball-noraml">
                            <?php $arr1 = explode(',',substr($v['opencode'],0,59));
                               $he1 = $arr1[0]+$arr1[1]+$arr1[2]+$arr1[3]+$arr1[4]+$arr1[5]
                                      +$arr1[6]+$arr1[7]+$arr1[8]+$arr1[9]+$arr1[10]+$arr1[11]
                                      +$arr1[12]+$arr1[13]+$arr1[14]+$arr1[15]+$arr1[16]+$arr1[17]
                                      +$arr1[18]+$arr1[19];
                                if($he1>810){echo '大';}else{echo '小';}
                           ?>
                            </i>
                        </td>
                        <!--大小-->

                        <!--单双-->
                        <td data-v-3a1bf799="" class="ball-none border-right"></td>
                        <td data-v-3a1bf799="" class="ball-none"></td>
                        <td data-v-3a1bf799="" class="dxxintai bgc_green border-right">
                            <i data-v-3a1bf799="" class="ball-noraml">
                                <?php $arr2 = explode(',',substr($v['opencode'],0,59));
                               $he2= $arr2[0]+$arr2[1]+$arr2[2]+$arr2[3]+$arr2[4]+$arr2[5]
                                      +$arr2[6]+$arr2[7]+$arr2[8]+$arr2[9]+$arr2[10]+$arr2[11]
                                      +$arr2[12]+$arr2[13]+$arr2[14]+$arr2[15]+$arr2[16]+$arr2[17]
                                      +$arr2[18]+$arr2[19];
                                if($he2%2==0){echo '双';}else{echo '单';}
                                ?>
                            </i>
                        </td>
                        <!--奇偶-->
                        <td data-v-3a1bf799="" class="ball-none border-right"></td>
                        <td data-v-3a1bf799="" class="ball-none"></td>
                        <td data-v-3a1bf799="" class="dxxintai bgc_red border-right">
                            <i data-v-3a1bf799="" class="ball-noraml">
                                <?php $arr3 = explode(',',substr($v['opencode'],0,59));
                               $he3= $arr3[0]+$arr3[1]+$arr3[2]+$arr3[3]+$arr3[4]+$arr3[5]
                                      +$arr3[6]+$arr3[7]+$arr3[8]+$arr3[9]+$arr3[10]+$arr3[11]
                                      +$arr3[12]+$arr3[13]+$arr3[14]+$arr3[15]+$arr3[16]+$arr3[17]
                                      +$arr3[18]+$arr3[19];
                                if($he3%2==0){echo '偶';}else{echo '奇';}
                                ?>
                            </i>
                        </td>
                        <!--和值-->
                        <td data-v-3a1bf799="" class="ball-none border-right"></td>
                        <td data-v-3a1bf799="" class="ball-none"></td>
                        <td data-v-3a1bf799="" class="">
                            <i data-v-3a1bf799="" class="ball-noraml">
                                <?php $arr4 = explode(',',substr($v['opencode'],0,59));
                               $he4= $arr4[0]+$arr4[1]+$arr4[2]+$arr4[3]+$arr4[4]+$arr4[5]
                                      +$arr4[6]+$arr4[7]+$arr4[8]+$arr4[9]+$arr4[10]+$arr4[11]
                                      +$arr4[12]+$arr4[13]+$arr4[14]+$arr4[15]+$arr4[16]+$arr4[17]
                                      +$arr4[18]+$arr4[19];
                               echo $he4;
                                ?>
                            </i>
                        </td>

                    </tr>
                </foreach>

                </tbody>



                <tfoot data-v-3a1bf799="" class="chart table-tfoot table-guides"><!----> <!----> <!----> <!----> <!---->
                <!----> </tfoot>
            </table>
        </div>
    </div>
</div>
<script>
    $(function(){
        var bdTbody = $("#J-chart-content").find("tr:nth-of-type(5n)");
        var bdTfoot = $(".table-tfoot").find("tr,td");
        bdTbody.addClass("border-bottom");
        bdTbody.find("td").addClass("border-bottom");
        bdTfoot.addClass("border-bottom");
        $(".label").each(function(i){
            var That = $(this);
            That.click(function(){
                if( That.data("state") == 1){
                    That.find("input").prop("checked",false);
                    That.data("state",2);
                }else{
                    That.find("input").prop("checked",true);
                    That.data("state",1);
                }
                if(That.find("input").is(":checked")){
                    if(i == 0){
                        bdTbody.addClass("border-bottom");
                        bdTbody.find("td").addClass("border-bottom");
                        bdTfoot.addClass("border-bottom");
                    }
                }else{
                    if(i == 0){
                        bdTbody.removeClass("border-bottom");
                        bdTbody.find("td").removeClass("border-bottom");
                        bdTfoot.removeClass("border-bottom");
                    }
                }

            })
        });
//        折叠功能区
        $(".funAreaBtn").click(function(){
            $(this).toggleClass("curr");
            if($(this).hasClass("curr")){
                $(this).find("em").text("展开功能区");
                $(".chart_control_cont").hide();
            }else{
                $(this).find("em").text("收起功能区");
                $(".chart_control_cont").show();
            }

        })
    })
</script>
</body>
</html>